package com.eight.vote.controller;


import com.eight.vote.pojo.VOptionInfo;
import com.eight.vote.service.VOptionInfoService;
import com.eight.vote.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 点点星言
 * @since 2022-10-16
 */
@RestController
@RequestMapping("/api/vote")
public class VOptionInfoController {

    @Autowired
    VOptionInfoService optionInfoService;
    @PostMapping("addOptionInfo")
    public Result addOption(@RequestBody VOptionInfo optionInfo){
        return optionInfoService.addOption(optionInfo);
    }

}

